/********************************************************************
FileName    :   Bll_WorkGroupUserList.cs
CreateTime  :   2015-10-27 04:10
BaseClass   :   Bll_WorkGroupUserList
FileType    :   .cs
Author      :  minjie
Description :   Bll_WorkGroupUserListBLL层（简单三层）
*********************************************************************/

using System;
using System.Text;
using System.Collections.Generic;

using System.Data;
using OS.Common;
using OS.DAL;
namespace OS.BLL
{
	/// <summary>
	/// Bll_WorkGroupUserList的摘要说明。
	/// </summary>
public partial class   Bll_WorkGroupUserList 
  	{ 
     		      
  		private readonly Dal_WorkGroupUserList dal=new  Dal_WorkGroupUserList(); 
  		public  Bll_WorkGroupUserList() 
  		{} 
  		 
  		#region  Method 
  		/// <summary> 
  		/// 增加一条数据 
  		/// </summary> 
  		public bool  Add(WorkGroupUserList_Entity model) 
  		{ 
  			return dal.Add(model); 
  		} 
   
  		/// <summary> 
  		/// 增加一条数据 
  		/// </summary> 
  		public  string  AddStr(WorkGroupUserList_Entity model) 
  		{ 
  			return dal.AddStr(model); 
  		} 
   
  		/// <summary> 
  		/// 更新一条数据 
  		/// </summary> 
  		public bool Update(WorkGroupUserList_Entity model) 
  		{ 
  			return dal.Update(model); 
  		} 
   
  		/// <summary> 
  		/// 删除一条数据 
  		/// </summary> 
  		public bool Delete(string  UserNo) 
  		{ 
  			 
  			return dal.Delete(UserNo); 
  		} 
  		/// <summary> 
  		/// 批量删除一批数据 
  		/// </summary> 
  		public bool DeleteList(string UserNolist ) 
  		{ 
  			return dal.DeleteList(UserNolist ); 
  		} 
  		/// <summary> 
  		/// 得到一个对象实体 
  		/// </summary> 
  		public WorkGroupUserList_Entity GetModel(string  UserNo) 
  		{ 
  			 
  			return dal.GetModel(UserNo); 
  		} 
   
  		/// <summary> 
  		/// 获得数据列表 
  		/// </summary> 
  		public DataSet GetList(string strWhere) 
  		{ 
  			return dal.GetList(strWhere); 
  		} 
  		/// <summary> 
  		/// 获得前几行数据 
  		/// </summary> 
  		public DataSet GetList(int Top,string strWhere,string filedOrder) 
  		{ 
  			return dal.GetList(Top,strWhere,filedOrder); 
  		} 
  		/// <summary> 
  		/// 获得数据列表 
  		/// </summary> 
  		public List<WorkGroupUserList_Entity> GetModelList(string strWhere) 
  		{ 
  			DataSet ds = dal.GetList(strWhere); 
  			return DataTableToList(ds.Tables[0]); 
  		} 
  		/// <summary> 
  		/// 获得数据列表 
  		/// </summary> 
  		public List<WorkGroupUserList_Entity> GetModelList(string strWhere, string orderby, int startIndex, int endIndex) 
  		{ 
  			DataSet ds = dal.GetListByPage(strWhere, orderby, startIndex, endIndex); 
  			return DataTableToList(ds.Tables[0]); 
  		} 
  		/// <summary> 
  		/// 获得数据列表 
  		/// </summary> 
  		public List<WorkGroupUserList_Entity> DataTableToList(DataTable dt) 
  		{ 
  			List<WorkGroupUserList_Entity> modelList = new List<WorkGroupUserList_Entity>(); 
  		  if (dt!=null ) 
  		  { 
  			int rowsCount = dt.Rows.Count; 
  			if (rowsCount > 0) 
  			{ 
  				WorkGroupUserList_Entity   model; 
  				for (int n = 0; n < rowsCount; n++) 
  				{ 
  					model = new WorkGroupUserList_Entity();					 
  				model.WId= dt.Rows[n]["WId"].ToString(); 
  				model.WorkGroupId= dt.Rows[n]["WorkGroupId"].ToString(); 
  				model.UserNo= dt.Rows[n]["UserNo"].ToString(); 
  				 
  					modelList.Add(model); 
  				} 
  			} 
  		} 
  			return modelList; 
  		} 
   
  		/// <summary> 
  		/// 获得数据列表 
  		/// </summary> 
  		public DataSet GetAllList() 
  		{ 
  			return GetList(""); 
  		} 
   
  		/// <summary> 
  		/// 获取记录总数 
  		/// </summary> 
  		public int GetRecordCount(string strWhere) 
  		{ 
  			return  dal.GetRecordCount(strWhere); 
  		} 
  #endregion 
      
  	} 
  
}
